package com.clover.ehcache.web;

import com.clover.ehcache.domain.UserVO;
import com.clover.ehcache.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("getAll")
    public List<UserVO> getAll(){
        List<UserVO> users = userService.findAll();
        return users;
    }

}
